﻿<?php
error_reporting(5);
include_once('sdk.class.php');
header('Content-type: application/json');
$accesskey = $_GET["ak"];
$secretkey = $_GET["sk"];
$callback = $_GET['callback'];
$param['deadline'] = time()+60*60;
$param['album'] = $_GET["xcid"];
if ($_GET["action"] = "up"){
$param['returnBody'] = array('height' => 'h','width' => 'w',$_GET["html"]=> 'url','type'=>'type');
}
if ($_GET["action"] = "xc"){
$param['action'] = 'album';
$param['page_no'] = $_GET["page"];//选填
}
$sdk = new tietusdk($accesskey,$secretkey);
$Token=$sdk->Dealparam($param)->Token();
$jarr=array(
    "Token" =>  $Token
);

echo $callback."(".json_encode($jarr).");";



//echo json_encode($jarr) ;
?>